﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace cadbom
{
    class GValues
    {
        private static string _dbpath = "C:\\erptestdll\\cadbom.db";
        private static string _configPath = "C:\\erptestdll\\config.txt";
        private static string _pdfPath = "c:\\plot2pdf2upload";
        private static bool _isCreateQrcode = false;

        private static string _CADMainProductCode = "";

        private static bool _CadBlockTableProcess = true; //20250814 科尔达插入表格
        private static bool _CADCreateProductCode = false; //2025425 百舸项目CAD创建产品代码
        private static bool _CADCreateMaterialCode = false; //20251122 汇大明智能
        private static bool _CADCreateProductDwgFile = false;
        //private static string _dbpath = "cadbom.db";
        //private static string _configPath = "config.txt";
        private static bool _processFormClosed = true; //工序FORM控制变量
        public static int sharedValue { get; set; }
        public static string tenant { get; set; } //租户ID
        public static string productCode { get; set; } //产品代码
        public static string productCustCode { get; set; }//客户料号
        public static string token { get; set; } //登入TOKEN
        public static string loginLabelStatus { get; set; }
        public static string domainLink { get; set; }

        //CAD快的字段
        private static string _BlockField_ProductName = "产品名称";
        private static string _BlockField_TuHao = "图号";
        private static string _BlockField_CaiLiao = "材料";
        private static string _BlockField_CaiHou = "材厚";
        private static string _BlockField_HouDu = "厚度";
        private static string _BlockField_SurfaceChuli = "表面处理";
        //private static string _BlockField_SemiProductName = "零件名称";
        private static string _BlockField_ProductVer = "版本";
        private static string _BlockField_CustCode = "客户料号";
        private static string _BlockField_CustName = "客户名称";
        private static string _BlockField_BomQty = "数量";
        private static string _BlockField_Engineers = "工程";
        private static string _BlockField_Project = "项目";
        private static string _BlockField_SizeLength = "长";
        private static string _BlockField_SizeWidth = "宽";
        private static double _BlockField_LossRate = 0.0;
        private static double _BlockField_FenmoLossRate = 0.0;

        private static string _BlockField_MainProductName = "产品名称";
        private static string _BlockField_MainProductCode = "产品编码";
        private static string _BlockField_CustomerCode = "客户";
        private static string _BlockField_CustomerShortName = "客户简称";
        private static string _BlockField_SemiProductName = "零件名称";
        private static string _BlockField_SemiProductCode = "零件编码";
        private static string _BlockField_SemiProductCustCode = "客户料号";
        private static string _BlockField_SemiProductDrawingNo = "零件图号";
        private static string _BlockField_SemiProductModel = "零件规格";
        private static string _BlockField_SemiProductVer = "REV";
        private static string _BlockField_SemiProductDescription = "零件描述";
        private static string _BlockField_SemiProductCaiLiao = "零件材料";
        private static string _BlockField_SemiProductCaiHou = "材料厚度";
        private static string _BlockField_SemiProductSizeLength = "长度";
        private static string _BlockField_SemiProductSizeWidth = "宽度";
        private static string _BlockField_SemiProductWeight = "重量";
        private static string _BlockField_SemiProductBomQty = "数量";
        private static string _BlockField_SemiProductSurfaceChuli = "表面处理";

        private static List<BasProduct> _createSemiProductCodeList = null;
        private static bool _AutoCreateSemiProductCode = false;
        private static BasMaterial _SaveMaterialCallback = null;


        public static bool CADCreateMaterialCode
        {
            get { return _CADCreateMaterialCode; }
            set { _CADCreateMaterialCode = value; }
        }
        public static BasMaterial SaveMaterialCallback
        {
            get { return _SaveMaterialCallback; }
            set { _SaveMaterialCallback = value; }
        }
        public static bool AutoCreateSemiProductCode
        {
            get { return _AutoCreateSemiProductCode; }
            set { _AutoCreateSemiProductCode = value; }
        }
        public static List<BasProduct> createSemiProductCodeList
        {
            get { return _createSemiProductCodeList; }
            set { _createSemiProductCodeList = value; }
        }
        public static string BlockField_MainProductName
        {
            get { return _BlockField_MainProductName; }
            set { _BlockField_MainProductName = value; }
        }

        public static string BlockField_MainProductCode
        {
            get { return _BlockField_MainProductCode; }
            set { _BlockField_MainProductCode = value; }
        }
        public static string BlockField_CustomerCode
        {
            get { return _BlockField_CustomerCode; }
            set { _BlockField_CustomerCode = value; }
        }
        public static string BlockField_CustomerShortName
        {
            get { return _BlockField_CustomerShortName; }
            set { _BlockField_CustomerShortName = value; }
        }
        //public static string BlockField_SemiProductName
        //{
        //    get { return _BlockField_SemiProductName; }
        //    set { _BlockField_SemiProductName = value; }
        //}
        public static string BlockField_SemiProductCode
        {
            get { return _BlockField_SemiProductCode; }
            set { _BlockField_SemiProductCode = value; }
        }
        public static string BlockField_SemiProductCustCode
        {
            get { return _BlockField_SemiProductCustCode; }
            set { _BlockField_SemiProductCustCode = value; }
        }
        public static string BlockField_SemiProductDrawingNo
        {
            get { return _BlockField_SemiProductDrawingNo; }
            set { _BlockField_SemiProductDrawingNo = value; }
        }
        public static string BlockField_SemiProductModel
        {
            get { return _BlockField_SemiProductModel; }
            set { _BlockField_SemiProductModel = value; }
        }
        public static string BlockField_SemiProductVer
        {
            get { return _BlockField_SemiProductVer; }
            set { _BlockField_SemiProductVer = value; }
        }
        public static string BlockField_SemiProductDescription
        {
            get { return _BlockField_SemiProductDescription; }
            set { _BlockField_SemiProductDescription = value; }
        }
        public static string BlockField_SemiProductCaiLiao
        {
            get { return _BlockField_SemiProductCaiLiao; }
            set { _BlockField_SemiProductCaiLiao = value; }
        }
        public static string BlockField_SemiProductCaiHou
        {
            get { return _BlockField_SemiProductCaiHou; }
            set { _BlockField_SemiProductCaiHou = value; }
        }
        public static string BlockField_SemiProductSizeLength
        {
            get { return _BlockField_SemiProductSizeLength; }
            set { _BlockField_SemiProductSizeLength = value; }
        }
        public static string BlockField_SemiProductSizeWidth
        {
            get { return _BlockField_SemiProductSizeWidth; }
            set { _BlockField_SemiProductSizeWidth = value; }
        }
        public static string BlockField_SemiProductWeight
        {
            get { return _BlockField_SemiProductWeight; }
            set { _BlockField_SemiProductWeight = value; }
        }
        public static string BlockField_SemiProductBomQty
        {
            get { return _BlockField_SemiProductBomQty; }
            set { _BlockField_SemiProductBomQty = value; }
        }
        public static string BlockField_SemiProductSurfaceChuli
        {
            get { return _BlockField_SemiProductSurfaceChuli; }
            set { _BlockField_SemiProductSurfaceChuli = value; }
        }

        //
        public static double BlockField_LossRate
        {
            get { return _BlockField_LossRate; }
            set { _BlockField_LossRate = value; }
        }
        public static double BlockField_FenmoLossRate
        {
            get { return _BlockField_FenmoLossRate; }
            set { _BlockField_FenmoLossRate = value; }
        }
        public static string BlockField_SizeWidth
        {
            get { return _BlockField_SizeWidth; }
            set { _BlockField_SizeWidth = value; }
        }
        public static string BlockField_SizeLength
        {
            get { return _BlockField_SizeLength; }
            set { _BlockField_SizeLength = value; }
        }
        public static string BlockField_Project
        {
            get { return _BlockField_Project; }
            set { _BlockField_Project = value; }
        }
        public static string BlockField_Engineers
        {
            get { return _BlockField_Engineers; }
            set { _BlockField_Engineers = value; }
        }
        public static string BlockField_BomQty
        {
            get { return _BlockField_BomQty; }
            set { _BlockField_BomQty = value; }
        }
        public static string BlockField_ProductName
        {
            get { return _BlockField_ProductName; }
            set { _BlockField_ProductName = value; }
        }
        public static string BlockField_TuHao
        {
            get { return _BlockField_TuHao; }
            set { _BlockField_TuHao = value; }
        }
        public static string BlockField_CaiLiao
        {
            get { return _BlockField_CaiLiao; }
            set { _BlockField_CaiLiao = value; }
        }
        public static string BlockField_CaiHou
        {
            get { return _BlockField_CaiHou; }
            set { _BlockField_CaiHou = value; }
        }
        public static string BlockField_HouDu 
        {
            get { return _BlockField_HouDu; }
            set { _BlockField_HouDu = value; }
        }
        public static string BlockField_SurfaceChuli
        {
            get { return _BlockField_SurfaceChuli; }
            set { _BlockField_SurfaceChuli = value; }
        }
        public static string BlockField_ProductVer
        {
            get { return _BlockField_ProductVer; }
            set { _BlockField_ProductVer = value; }

        }
        public static string BlockField_SemiProductName
        {
            get { return _BlockField_SemiProductName; }
            set { _BlockField_SemiProductName = value; }
        }
        public static string BlockField_CustCode
        {
            get { return _BlockField_CustCode; }
            set { _BlockField_CustCode = value; }
        }
        public static string BlockField_CustName
        {
            get { return _BlockField_CustName; }
            set { _BlockField_CustName = value; }
        }
        //
        public static string CADMainProductCode
        {
            get { return _CADMainProductCode; }
            set { _CADMainProductCode = value; }
        }
        public static bool CADCreateProductCode { 
            get { return _CADCreateProductCode; }
            set { _CADCreateProductCode = value; }
        }

        public static bool CadBlockTableProcess
        {
            get { return _CadBlockTableProcess; }
            set { _CadBlockTableProcess = value; }
        }
        public static bool CADCreateProductDwgFile
        {
            get { return _CADCreateProductDwgFile; }
            set { _CADCreateProductDwgFile = value; }
        }

        public static string customerDefCode { get; set; } //客户代码
        public static string account { get; set; } //用户
        public static string password { get; set; } //用户密码
        public static string cadHandleId { get; set; } //图纸表格句柄

        public static string selectedBlockHandelId { get; set; }
        public static Boolean cancelCol { get; set; } //取消列

        public static string clickButtonText = ""; //命令按钮执行选择

        public static string _qrCodeData = "";
        public static bool isCreateQrcode
        {
            get { return _isCreateQrcode; }
            set { _isCreateQrcode = value; }
        }

        public static string qrCodeData
        {
            get { return _qrCodeData; }
            set { _qrCodeData = value; }
        }

        public static string pdfPath
        {
            get { return _pdfPath; }
            set { _pdfPath = value; }
        }
        public static string configPath
        {
            get { return _configPath; }
            set { _configPath = value; }
        }
        public static bool processFormClosed
        {
            get { return _processFormClosed; }
            set { _processFormClosed = value; }
        }
        public static string dbpath
        {
            get { return _dbpath;}
            set
            {
                _dbpath = value;
            }
        }
        
    }

    class QueryParamater
    {
        public String superQueryMatchType { get; set; }
        public String superQueryParams { get; set; }
        public int row { get; set; }
        public int col { get; set; }
    }
    class ParamArr
    {
        public String rule { get; set; }
        public String type { get; set; }
        public String dictCode { get; set; }
        public String dictTable { get; set; }
        public String dictText { get; set; }
        public String val { get; set; }
        public String field { get; set; }
    }
    class BasMaterialCategory
    {
        	/**ID*/

        public String id { get; set; }
	/**父节点*/

        public String pid { get; set; }
	/**是否有子节点*/

        public String hasChild { get; set; }
	/**名称*/

        public String name { get; set; }
	/**编码*/

        public String code { get; set; }
	/**全名*/

        public String fullname { get; set; }
	/**是否启用*/


    //public Integer isEnabled;
	/**创建人*/

        public String createBy { get; set; }
	/**创建时间*/

        public String createTime { get; set; }
	/**修改人*/

        public String updateBy { get; set; }
	/**修改时间*/

        public String updateTime { get; set; }
	/**版本*/
    //public Integer version;
	
    //public Boolean defaultSystem;
	

	public List<BasMaterialCategory> childs;
    }

    class BasMeasureUnit
    {
        /**ID*/

	public String id {get;set;}
	/**名称*/

    public String name { get; set; }
	/**符号*/

    public String symbol { get; set; }
	/**是否基准*/

    public String hasChild { get; set; }
	/**单位类型(count-计数 weight-重量 size-尺寸)*/

    public String unitType { get; set; }
	/**基准单位*/

    public String pid { get; set; }
	/**换算系数*/

    public String factor { get; set; }
	/**是否启用*/

    public String isEnabled { get; set; }
    public String remark { get; set; }
	/**创建人*/

    public String createBy { get; set; }
	/**创建时间*/

    public String createTime { get; set; }
	/**修改人*/

    public String updateBy { get; set; }
	/**修改时间*/


    public String updateTime { get; set; }
	/**版本*/
    public String version { get; set; }
    }


}
